package com.kky.pp.popup

import android.content.Context
import android.widget.ImageView
import android.widget.TextView
import com.kky.pp.R
import razerdp.basepopup.BasePopupWindow

class MemberBuySuccessPopup(var ctx: Context, var listener : ChangeMembershipListener) :  BasePopupWindow(ctx) {
    init {
        setContentView(R.layout.popup_buy_member_success)
        initView()
    }

    private fun initView() {
        val dialogConfirm = findViewById<TextView>(R.id.txtPopupBuyVipSuccessConfirm)
        val dialogClose = findViewById<ImageView>(R.id.imgViewPopupBuyVipSuccessClose)


        dialogClose.setOnClickListener {
            listener.onListener()
            dismiss()
        }
        dialogConfirm.setOnClickListener {
            listener.onListener()
            dismiss()
        }

        setOutSideDismiss(true)
    }

    interface ChangeMembershipListener{
        fun onListener()
    }

}